package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.EmployeeCourseDto;
import edu.suda.xsap.entity.EmployeeCourse;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface EmployeeCourseConvert {
    @Mapping(source="name", target = "name")
    @Mapping(source="course_id", target = "course_id")
    @Mapping(source="time", target = "time")

    EmployeeCourseDto toDto(EmployeeCourse employeeCourse);
    List<EmployeeCourseDto> toDtoList(List<EmployeeCourse> employeeCourses);
}
